package zjut.cocouml.wizard;

import org.eclipse.jface.wizard.Wizard;

import zjut.cocouml.wizard.page.ModifyMethodWizardPage;

public class ModifyMethodWizard extends Wizard{
	
	public ModifyMethodWizard(boolean isInterface) {
		addPage(new ModifyMethodWizardPage("ModifyMethod",isInterface));
	}

	public boolean performFinish() {
		
		ModifyMethodWizardPage page = (ModifyMethodWizardPage)getPage("ModifyMethod");
		this.newName = page.getTextName();
		this.accessAuthrity = page.getAccessAuthrity();
		this.isAbstract = page.getModifiers().contains("abstract");
		this.isFinal = page.getModifiers().contains("final");
		this.isStatic = page.getModifiers().contains("static");
		this.returnType = page.getTypeName();
		this.paramters = page.getParameters();
		
		System.out.println("................. ModifyMethodWizard returnType == " + returnType);
		return true;
	}
	
	private String newName;
	private String returnType;
	private String accessAuthrity;
	private String paramters;
	
	private boolean isFinal;
	private boolean isStatic;
	private boolean isAbstract;
	
	public String getNewName() {
		return newName;
	}
	
	public String getReturnType() {
		return returnType;
	}
	
	public String getAccessAuthrity() {
		return accessAuthrity;
	}
	
	public String getParamters() {
		return paramters;
	}
	
	public boolean isFinal() {
		return isFinal;
	}
	
	public boolean isStatic() {
		return isStatic;
	}

	public boolean isAbstract() {
		return isAbstract;
	}

	
}
